
<?php
	if ($_GET['username']) {
        $where = "username like '%".$_GET['username']."%'";
        if ($this->user['uid'] == 1) {//超级管理员
            
            $sql="select * from {$this->prename}tixian where ".$where." order by tx_id desc";
            $data=$this->getPage($sql, $this->page, $this->pageSize);
            
        }else{//其他合伙人管理员

            $sql="select * from {$this->prename}tixian where dingji_id=".$this->user['uid']." and ".$where." order by tx_id desc";
            $data=$this->getPage($sql, $this->page, $this->pageSize);

        }
    }else{
        if ($this->user['uid'] == 1) {//超级管理员
        
            $sql="select * from {$this->prename}tixian order by tx_id desc";
            $data=$this->getPage($sql, $this->page, $this->pageSize);
            
        }else{//其他合伙人管理员

            $sql="select * from {$this->prename}tixian where dingji_id=".$this->user['uid']." order by tx_id desc";
            $data=$this->getPage($sql, $this->page, $this->pageSize);

        }
    }
?>
<table class="tablesorter" cellspacing="0">
    <thead>
        <tr>
            <th>UserID</th>
            <th>用户名</th>
            <th>提现金额</th>
            <th>银行名称</th>
            <th>开户姓名</th>
            <th>银行卡号</th>
            <th>申请时间</th>
            <th>状态</th>
            <th>处理时间</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
    <?php if($data['data']) foreach($data['data'] as $var){ ?>
        <tr>
            <td><?=$var['uid']?></td>
            <td><?=$var['username']?></td>
            <td><?=$var['amount']?></td>
            <td><?=$var['bankname']?></td>
            <td><?=$var['names']?></td>
            <td><?=$var['bank_hm']?></td>
            <td><?=date('Y-m-d H:i:s', $var['add_time'])?></td>
            <td><?php if($var['status'] == 0){ ?><a style="color: #77BACE;" width="420">未审核</a><?php }else{ ?><a style="color: #77BACE;" width="420">已审核</a><?php } ?></td>
            <td><?=date('Y-m-d H:i:s', $var['upd_time'])?></td>
            <td align="center">
            <?php if($var['status']==0){ ?>
                <a href="/admin778899.php/business/cashActionModalss/<?=$var['tx_id']?>" target="modal"  width="420" title="提款处理" modal="true" button="确定:dataAddCode|取消:defaultCloseModal">审核</a>
            <?php } ?>
            </td>
        </tr>
    <?php }else{ ?>
        <tr>
            <td colspan="8" align="center">暂时没有人申请提现。</td>
        </tr>
    <?php } ?>
    </tbody>
    </table>
<footer>
<?php
		$rel=get_class($this).'/cashLog-{page}?'.http_build_query($_GET,'','&');
		$this->display('inc/page.php', 0, $data['total'], $rel, 'defaultReplacePageAction');
?>
</footer>
<script type="text/javascript">  
ghhs("nav01","tr");  
</script>